package cn.edu.swu.hh;

public class Course {
    //手写属性
    private String courseId;
    private String courseName;
    private String teacher;

    //自动生成带参构造
    public Course(String courseId, String courseName, String teacher) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacher = teacher;
    }
    //手写无参构造
    public Course() {

    }

    //自动生成getter和setter
    public String getCourseId() {
        return courseId;
    }
    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }
    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTeacher() {
        return teacher;
    }
    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    //手写showInfo()方法
    public void showInfo() {
        System.out.println("课程编号：" + courseId);
        System.out.println("课程名称：" + courseName);
        System.out.println("任课教师：" + teacher);
        System.out.println("---------------------------");
    }
}
